import request from '@/utils/request'

const api = {
  userList: '/api/withdraw/encryption/v1/list',
  userWithdrawInfo: '/api/withdraw/encryption/v1/details',
  audits: '/api/withdraw/encryption/v1/review',
  userBalanceAdjustmentList: '/api/userBalanceAdjustment/encryption/v1/list',
  userBalanceAdjustmentDetail: '/api/userBalanceAdjustment/encryption/v1/detail',
  userBalanceAdjustmentSave: '/api/userBalanceAdjustment/encryption/v1/save',
  teamList: '/api/userManagement/encryption/v1/teamList',
  teamDetail: '/api/userManagement/encryption/v1/teamDetail',
  accountChangeList: '/api/userManagement/encryption/v1/accountChangeList',
  getUserList: '/api/userManagement/encryption/v1/userList',
  userDetail: '/api/userManagement/encryption/v1/userDetail',
  userResetBankInfo: '/api/userManagement/encryption/v1/userResetBankInfo',
  userResetPassword: '/api/userManagement/encryption/v1/userResetPassword',
  userResetCertification: '/api/userManagement/encryption/v1/userResetCertification',
  userDisableAccount: '/api/userManagement/encryption/v1/userDisableAccount',
  userFreezeAccount: '/api/userManagement/encryption/v1/userFreezeAccount',
  subReportList: '/api/userManagement/encryption/v1/subReportList', // 认购流水报表
  teamIncomeReport: '/api/userManagement/encryption/v1/team-income-report', // 团队收益报表
}

export default api

export function userWithdrawalList(parameter) {
  return request({
    url: api.userList,
    method: 'post',
    data: parameter,
  })
}

export function userWithdrawInfo(parameter) {
  return request({
    url: api.userWithdrawInfo,
    method: 'post',
    data: parameter,
  })
}

export function audits(parameter) {
  return request({
    url: api.audits,
    method: 'post',
    data: parameter,
  })
}

export function userBalanceAdjustmentList(parameter) {
  return request({
    url: api.userBalanceAdjustmentList,
    method: 'post',
    data: parameter,
  })
}

export function userBalanceAdjustmentDetail(parameter) {
  return request({
    url: api.userBalanceAdjustmentDetail,
    method: 'post',
    data: parameter,
  })
}

export function userBalanceAdjustmentSave(parameter) {
  return request({
    url: api.userBalanceAdjustmentSave,
    method: 'post',
    data: parameter,
  })
}

// 团队列表
export function teamList(parameter) {
  return request({
    url: api.teamList,
    method: 'post',
    data: parameter,
  })
}
// 团队详情
export function teamDetail(parameter) {
  return request({
    url: api.teamDetail,
    method: 'post',
    data: parameter,
  })
}
// 用户流水列表
export function accountChangeList(parameter) {
  return request({
    url: api.accountChangeList,
    method: 'post',
    data: parameter,
  })
}
// 用户列表
export function getUserList(parameter) {
  return request({
    url: api.getUserList,
    method: 'post',
    data: parameter,
  })
}
// 用户详情
export function userDetail(parameter) {
  return request({
    url: api.userDetail,
    method: 'post',
    data: parameter,
  })
}
// 重置所有银行卡信息
export function userResetBankInfo(parameter) {
  return request({
    url: api.userResetBankInfo,
    method: 'post',
    data: parameter,
  })
}
// 重置登录&支付密码
export function userResetPassword(parameter) {
  return request({
    url: api.userResetPassword,
    method: 'post',
    data: parameter,
  })
}
// 重置实名信息
export function userResetCertification(parameter) {
  return request({
    url: api.userResetCertification,
    method: 'post',
    data: parameter,
  })
}
// 禁用账号
export function userDisableAccount(parameter) {
  return request({
    url: api.userDisableAccount,
    method: 'post',
    data: parameter,
  })
}
// 冻结账号
export function userFreezeAccount(parameter) {
  return request({
    url: api.userFreezeAccount,
    method: 'post',
    data: parameter,
  })
}

// 认购流水报表
export function subReportList(parameter) {
  return request({
    url: api.subReportList,
    method: 'post',
    data: parameter,
  })
}

// 团队收益报表
export function teamIncomeReport(parameter) {
  return request({
    url: api.teamIncomeReport,
    method: 'post',
    data: parameter,
  })
}
